import {Card, Table} from 'antd';
import React from "react";
const columns = []
const data = []
const orgTree = [
    {
        "id":"00",
        "key":"0-0",
        "title":"小学数学",
        "disabled":true,
        "children":[
            {
                "id":65543,
                "name":"数与代数",
                "pathIds":"65543,",
                "ordinal":0,
                "depth":1,
                "subjectId":2,
                "parent_id":0,
                "title":"数与代数",
                "label":"数与代数",
                "value":65543,
                "key":"65543",
                "children":[
                    {
                        "id":65544,
                        "name":"数的认识",
                        "pathIds":"65543,65544,",
                        "ordinal":0,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"数的认识",
                        "label":"数的认识",
                        "value":65544,
                        "key":"65544",
                        "children":[
                            {
                                "id":65545,
                                "name":"整数的认识",
                                "pathIds":"65543,65544,65545,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"整数的认识",
                                "label":"整数的认识",
                                "value":65545,
                                "key":"65545"
                            },
                            {
                                "id":65546,
                                "name":"数的整除",
                                "pathIds":"65543,65544,65546,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"数的整除",
                                "label":"数的整除",
                                "value":65546,
                                "key":"65546"
                            },
                            {
                                "id":65547,
                                "name":"小数的认识",
                                "pathIds":"65543,65544,65547,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"小数的认识",
                                "label":"小数的认识",
                                "value":65547,
                                "key":"65547"
                            },
                            {
                                "id":65548,
                                "name":"分数和百分数的认识",
                                "pathIds":"65543,65544,65548,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"分数和百分数的认识",
                                "label":"分数和百分数的认识",
                                "value":65548,
                                "key":"65548"
                            },
                            {
                                "id":65549,
                                "name":"近似数",
                                "pathIds":"65543,65544,65549,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"近似数",
                                "label":"近似数",
                                "value":65549,
                                "key":"65549"
                            },
                            {
                                "id":65550,
                                "name":"负数",
                                "pathIds":"65543,65544,65550,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65544,
                                "title":"负数",
                                "label":"负数",
                                "value":65550,
                                "key":"65550"
                            }
                        ]
                    },
                    {
                        "id":65551,
                        "name":"数的运算",
                        "pathIds":"65543,65551,",
                        "ordinal":1,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"数的运算",
                        "label":"数的运算",
                        "value":65551,
                        "key":"65551",
                        "children":[
                            {
                                "id":65552,
                                "name":"整数的四则运算",
                                "pathIds":"65543,65551,65552,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"整数的四则运算",
                                "label":"整数的四则运算",
                                "value":65552,
                                "key":"65552"
                            },
                            {
                                "id":65553,
                                "name":"小数的四则运算",
                                "pathIds":"65543,65551,65553,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"小数的四则运算",
                                "label":"小数的四则运算",
                                "value":65553,
                                "key":"65553"
                            },
                            {
                                "id":65554,
                                "name":"分数的四则运算",
                                "pathIds":"65543,65551,65554,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"分数的四则运算",
                                "label":"分数的四则运算",
                                "value":65554,
                                "key":"65554"
                            },
                            {
                                "id":65555,
                                "name":"百分数的运算",
                                "pathIds":"65543,65551,65555,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"百分数的运算",
                                "label":"百分数的运算",
                                "value":65555,
                                "key":"65555"
                            },
                            {
                                "id":65556,
                                "name":"整数、小数、分数、百分数的混合运算",
                                "pathIds":"65543,65551,65556,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"整数、小数、分数、百分数的混合运算",
                                "label":"整数、小数、分数、百分数的混合运算",
                                "value":65556,
                                "key":"65556"
                            },
                            {
                                "id":65557,
                                "name":"电子计算器",
                                "pathIds":"65543,65551,65557,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"电子计算器",
                                "label":"电子计算器",
                                "value":65557,
                                "key":"65557"
                            },
                            {
                                "id":65558,
                                "name":"口算",
                                "pathIds":"65543,65551,65558,",
                                "ordinal":6,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"口算",
                                "label":"口算",
                                "value":65558,
                                "key":"65558"
                            },
                            {
                                "id":65559,
                                "name":"运算定律与简便运算",
                                "pathIds":"65543,65551,65559,",
                                "ordinal":7,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"运算定律与简便运算",
                                "label":"运算定律与简便运算",
                                "value":65559,
                                "key":"65559"
                            },
                            {
                                "id":65560,
                                "name":"数的简单估算",
                                "pathIds":"65543,65551,65560,",
                                "ordinal":8,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65551,
                                "title":"数的简单估算",
                                "label":"数的简单估算",
                                "value":65560,
                                "key":"65560"
                            }
                        ]
                    },
                    {
                        "id":65561,
                        "name":"应用题",
                        "pathIds":"65543,65561,",
                        "ordinal":2,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"应用题",
                        "label":"应用题",
                        "value":65561,
                        "key":"65561",
                        "children":[
                            {
                                "id":65562,
                                "name":"简单应用题",
                                "pathIds":"65543,65561,65562,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"简单应用题",
                                "label":"简单应用题",
                                "value":65562,
                                "key":"65562"
                            },
                            {
                                "id":65563,
                                "name":"复合应用题",
                                "pathIds":"65543,65561,65563,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"复合应用题",
                                "label":"复合应用题",
                                "value":65563,
                                "key":"65563"
                            },
                            {
                                "id":65564,
                                "name":"列方程解应用题",
                                "pathIds":"65543,65561,65564,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"列方程解应用题",
                                "label":"列方程解应用题",
                                "value":65564,
                                "key":"65564"
                            },
                            {
                                "id":65565,
                                "name":"分数应用题",
                                "pathIds":"65543,65561,65565,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"分数应用题",
                                "label":"分数应用题",
                                "value":65565,
                                "key":"65565"
                            },
                            {
                                "id":65566,
                                "name":"百分数应用题",
                                "pathIds":"65543,65561,65566,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"百分数应用题",
                                "label":"百分数应用题",
                                "value":65566,
                                "key":"65566"
                            },
                            {
                                "id":65567,
                                "name":"列比例解应用题",
                                "pathIds":"65543,65561,65567,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"列比例解应用题",
                                "label":"列比例解应用题",
                                "value":65567,
                                "key":"65567"
                            },
                            {
                                "id":65568,
                                "name":"图文应用题",
                                "pathIds":"65543,65561,65568,",
                                "ordinal":6,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"图文应用题",
                                "label":"图文应用题",
                                "value":65568,
                                "key":"65568"
                            },
                            {
                                "id":65569,
                                "name":"工程问题应用题",
                                "pathIds":"65543,65561,65569,",
                                "ordinal":7,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"工程问题应用题",
                                "label":"工程问题应用题",
                                "value":65569,
                                "key":"65569"
                            },
                            {
                                "id":65570,
                                "name":"路程问题应用题",
                                "pathIds":"65543,65561,65570,",
                                "ordinal":8,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"路程问题应用题",
                                "label":"路程问题应用题",
                                "value":65570,
                                "key":"65570"
                            },
                            {
                                "id":65571,
                                "name":"商品经济类应用题",
                                "pathIds":"65543,65561,65571,",
                                "ordinal":9,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"商品经济类应用题",
                                "label":"商品经济类应用题",
                                "value":65571,
                                "key":"65571"
                            },
                            {
                                "id":65572,
                                "name":"面积、体积相关应用题",
                                "pathIds":"65543,65561,65572,",
                                "ordinal":10,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"面积、体积相关应用题",
                                "label":"面积、体积相关应用题",
                                "value":65572,
                                "key":"65572"
                            },
                            {
                                "id":65573,
                                "name":"和差、倍数应用题",
                                "pathIds":"65543,65561,65573,",
                                "ordinal":11,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"和差、倍数应用题",
                                "label":"和差、倍数应用题",
                                "value":65573,
                                "key":"65573"
                            },
                            {
                                "id":65574,
                                "name":"排列与组合",
                                "pathIds":"65543,65561,65574,",
                                "ordinal":12,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65561,
                                "title":"排列与组合",
                                "label":"排列与组合",
                                "value":65574,
                                "key":"65574"
                            }
                        ]
                    },
                    {
                        "id":65575,
                        "name":"量与计量",
                        "pathIds":"65543,65575,",
                        "ordinal":3,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"量与计量",
                        "label":"量与计量",
                        "value":65575,
                        "key":"65575",
                        "children":[
                            {
                                "id":65576,
                                "name":"时间",
                                "pathIds":"65543,65575,65576,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65575,
                                "title":"时间",
                                "label":"时间",
                                "value":65576,
                                "key":"65576"
                            },
                            {
                                "id":65577,
                                "name":"长度",
                                "pathIds":"65543,65575,65577,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65575,
                                "title":"长度",
                                "label":"长度",
                                "value":65577,
                                "key":"65577"
                            },
                            {
                                "id":65578,
                                "name":"质量、重量",
                                "pathIds":"65543,65575,65578,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65575,
                                "title":"质量、重量",
                                "label":"质量、重量",
                                "value":65578,
                                "key":"65578"
                            },
                            {
                                "id":65579,
                                "name":"面积、体积、容积的单位及换算",
                                "pathIds":"65543,65575,65579,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65575,
                                "title":"面积、体积、容积的单位及换算",
                                "label":"面积、体积、容积的单位及换算",
                                "value":65579,
                                "key":"65579"
                            },
                            {
                                "id":65580,
                                "name":"货币",
                                "pathIds":"65543,65575,65580,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65575,
                                "title":"货币",
                                "label":"货币",
                                "value":65580,
                                "key":"65580"
                            }
                        ]
                    },
                    {
                        "id":65581,
                        "name":"式与方程",
                        "pathIds":"65543,65581,",
                        "ordinal":4,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"式与方程",
                        "label":"式与方程",
                        "value":65581,
                        "key":"65581",
                        "children":[
                            {
                                "id":65582,
                                "name":"用字母表示数",
                                "pathIds":"65543,65581,65582,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"用字母表示数",
                                "label":"用字母表示数",
                                "value":65582,
                                "key":"65582"
                            },
                            {
                                "id":65583,
                                "name":"求含有字母式子的值",
                                "pathIds":"65543,65581,65583,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"求含有字母式子的值",
                                "label":"求含有字母式子的值",
                                "value":65583,
                                "key":"65583"
                            },
                            {
                                "id":65584,
                                "name":"等式的概念及性质",
                                "pathIds":"65543,65581,65584,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"等式的概念及性质",
                                "label":"等式的概念及性质",
                                "value":65584,
                                "key":"65584"
                            },
                            {
                                "id":65585,
                                "name":"等式与方程的关系",
                                "pathIds":"65543,65581,65585,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"等式与方程的关系",
                                "label":"等式与方程的关系",
                                "value":65585,
                                "key":"65585"
                            },
                            {
                                "id":65586,
                                "name":"方程的概念",
                                "pathIds":"65543,65581,65586,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"方程的概念",
                                "label":"方程的概念",
                                "value":65586,
                                "key":"65586"
                            },
                            {
                                "id":65587,
                                "name":"方程的解和解方程",
                                "pathIds":"65543,65581,65587,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"方程的解和解方程",
                                "label":"方程的解和解方程",
                                "value":65587,
                                "key":"65587"
                            },
                            {
                                "id":65588,
                                "name":"方程的检验",
                                "pathIds":"65543,65581,65588,",
                                "ordinal":6,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65581,
                                "title":"方程的检验",
                                "label":"方程的检验",
                                "value":65588,
                                "key":"65588"
                            }
                        ]
                    },
                    {
                        "id":65589,
                        "name":"比和比例",
                        "pathIds":"65543,65589,",
                        "ordinal":5,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65543,
                        "title":"比和比例",
                        "label":"比和比例",
                        "value":65589,
                        "key":"65589",
                        "children":[
                            {
                                "id":65590,
                                "name":"比",
                                "pathIds":"65543,65589,65590,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"比",
                                "label":"比",
                                "value":65590,
                                "key":"65590"
                            },
                            {
                                "id":65591,
                                "name":"比例",
                                "pathIds":"65543,65589,65591,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"比例",
                                "label":"比例",
                                "value":65591,
                                "key":"65591"
                            },
                            {
                                "id":65592,
                                "name":"比和比例的联系和区别",
                                "pathIds":"65543,65589,65592,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"比和比例的联系和区别",
                                "label":"比和比例的联系和区别",
                                "value":65592,
                                "key":"65592"
                            },
                            {
                                "id":65593,
                                "name":"比和比例的应用",
                                "pathIds":"65543,65589,65593,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"比和比例的应用",
                                "label":"比和比例的应用",
                                "value":65593,
                                "key":"65593"
                            },
                            {
                                "id":65594,
                                "name":"比例尺",
                                "pathIds":"65543,65589,65594,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"比例尺",
                                "label":"比例尺",
                                "value":65594,
                                "key":"65594"
                            },
                            {
                                "id":65595,
                                "name":"正比例和反比例",
                                "pathIds":"65543,65589,65595,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65589,
                                "title":"正比例和反比例",
                                "label":"正比例和反比例",
                                "value":65595,
                                "key":"65595"
                            }
                        ]
                    }
                ]
            },
            {
                "id":65596,
                "name":"空间与图形",
                "pathIds":"65596,",
                "ordinal":1,
                "depth":1,
                "subjectId":2,
                "parent_id":0,
                "title":"空间与图形",
                "label":"空间与图形",
                "value":65596,
                "key":"65596",
                "children":[
                    {
                        "id":65597,
                        "name":"平面图形的认识",
                        "pathIds":"65596,65597,",
                        "ordinal":0,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"平面图形的认识",
                        "label":"平面图形的认识",
                        "value":65597,
                        "key":"65597",
                        "children":[
                            {
                                "id":65598,
                                "name":"直线、射线、线段",
                                "pathIds":"65596,65597,65598,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"直线、射线、线段",
                                "label":"直线、射线、线段",
                                "value":65598,
                                "key":"65598"
                            },
                            {
                                "id":65599,
                                "name":"角",
                                "pathIds":"65596,65597,65599,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"角",
                                "label":"角",
                                "value":65599,
                                "key":"65599"
                            },
                            {
                                "id":65600,
                                "name":"平行与垂直",
                                "pathIds":"65596,65597,65600,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"平行与垂直",
                                "label":"平行与垂直",
                                "value":65600,
                                "key":"65600"
                            },
                            {
                                "id":65601,
                                "name":"三角形",
                                "pathIds":"65596,65597,65601,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"三角形",
                                "label":"三角形",
                                "value":65601,
                                "key":"65601"
                            },
                            {
                                "id":65602,
                                "name":"平行四边形",
                                "pathIds":"65596,65597,65602,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"平行四边形",
                                "label":"平行四边形",
                                "value":65602,
                                "key":"65602"
                            },
                            {
                                "id":65603,
                                "name":"长方形",
                                "pathIds":"65596,65597,65603,",
                                "ordinal":5,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"长方形",
                                "label":"长方形",
                                "value":65603,
                                "key":"65603"
                            },
                            {
                                "id":65604,
                                "name":"正方形",
                                "pathIds":"65596,65597,65604,",
                                "ordinal":6,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"正方形",
                                "label":"正方形",
                                "value":65604,
                                "key":"65604"
                            },
                            {
                                "id":65605,
                                "name":"梯形",
                                "pathIds":"65596,65597,65605,",
                                "ordinal":7,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"梯形",
                                "label":"梯形",
                                "value":65605,
                                "key":"65605"
                            },
                            {
                                "id":65606,
                                "name":"圆、扇形、圆环",
                                "pathIds":"65596,65597,65606,",
                                "ordinal":8,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65597,
                                "title":"圆、扇形、圆环",
                                "label":"圆、扇形、圆环",
                                "value":65606,
                                "key":"65606"
                            }
                        ]
                    },
                    {
                        "id":65607,
                        "name":"立体图形的认识",
                        "pathIds":"65596,65607,",
                        "ordinal":1,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"立体图形的认识",
                        "label":"立体图形的认识",
                        "value":65607,
                        "key":"65607",
                        "children":[
                            {
                                "id":65608,
                                "name":"长方体",
                                "pathIds":"65596,65607,65608,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65607,
                                "title":"长方体",
                                "label":"长方体",
                                "value":65608,
                                "key":"65608"
                            },
                            {
                                "id":65609,
                                "name":"正方体",
                                "pathIds":"65596,65607,65609,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65607,
                                "title":"正方体",
                                "label":"正方体",
                                "value":65609,
                                "key":"65609"
                            },
                            {
                                "id":65610,
                                "name":"圆柱",
                                "pathIds":"65596,65607,65610,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65607,
                                "title":"圆柱",
                                "label":"圆柱",
                                "value":65610,
                                "key":"65610"
                            },
                            {
                                "id":65611,
                                "name":"圆锥",
                                "pathIds":"65596,65607,65611,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65607,
                                "title":"圆锥",
                                "label":"圆锥",
                                "value":65611,
                                "key":"65611"
                            }
                        ]
                    },
                    {
                        "id":65612,
                        "name":"周长公式",
                        "pathIds":"65596,65612,",
                        "ordinal":2,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"周长公式",
                        "label":"周长公式",
                        "value":65612,
                        "key":"65612"
                    },
                    {
                        "id":65613,
                        "name":"面积公式",
                        "pathIds":"65596,65613,",
                        "ordinal":3,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"面积公式",
                        "label":"面积公式",
                        "value":65613,
                        "key":"65613"
                    },
                    {
                        "id":65614,
                        "name":"体积公式",
                        "pathIds":"65596,65614,",
                        "ordinal":4,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"体积公式",
                        "label":"体积公式",
                        "value":65614,
                        "key":"65614"
                    },
                    {
                        "id":65615,
                        "name":"图形与变换",
                        "pathIds":"65596,65615,",
                        "ordinal":5,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"图形与变换",
                        "label":"图形与变换",
                        "value":65615,
                        "key":"65615"
                    },
                    {
                        "id":65616,
                        "name":"方向和位置",
                        "pathIds":"65596,65616,",
                        "ordinal":6,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"方向和位置",
                        "label":"方向和位置",
                        "value":65616,
                        "key":"65616"
                    },
                    {
                        "id":65617,
                        "name":"观察物体",
                        "pathIds":"65596,65617,",
                        "ordinal":7,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65596,
                        "title":"观察物体",
                        "label":"观察物体",
                        "value":65617,
                        "key":"65617"
                    }
                ]
            },
            {
                "id":65618,
                "name":"统计和概率",
                "pathIds":"65618,",
                "ordinal":2,
                "depth":1,
                "subjectId":2,
                "parent_id":0,
                "title":"统计和概率",
                "label":"统计和概率",
                "value":65618,
                "key":"65618",
                "children":[
                    {
                        "id":65619,
                        "name":"统计",
                        "pathIds":"65618,65619,",
                        "ordinal":0,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65618,
                        "title":"统计",
                        "label":"统计",
                        "value":65619,
                        "key":"65619",
                        "children":[
                            {
                                "id":65620,
                                "name":"事物的比较、排列、和分类",
                                "pathIds":"65618,65619,65620,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65619,
                                "title":"事物的比较、排列、和分类",
                                "label":"事物的比较、排列、和分类",
                                "value":65620,
                                "key":"65620"
                            },
                            {
                                "id":65621,
                                "name":"数据的搜集",
                                "pathIds":"65618,65619,65621,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65619,
                                "title":"数据的搜集",
                                "label":"数据的搜集",
                                "value":65621,
                                "key":"65621"
                            },
                            {
                                "id":65622,
                                "name":"统计图",
                                "pathIds":"65618,65619,65622,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65619,
                                "title":"统计图",
                                "label":"统计图",
                                "value":65622,
                                "key":"65622"
                            },
                            {
                                "id":65623,
                                "name":"统计表",
                                "pathIds":"65618,65619,65623,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65619,
                                "title":"统计表",
                                "label":"统计表",
                                "value":65623,
                                "key":"65623"
                            },
                            {
                                "id":65624,
                                "name":"平均数、中位数、众数",
                                "pathIds":"65618,65619,65624,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65619,
                                "title":"平均数、中位数、众数",
                                "label":"平均数、中位数、众数",
                                "value":65624,
                                "key":"65624"
                            }
                        ]
                    },
                    {
                        "id":65625,
                        "name":"可能性",
                        "pathIds":"65618,65625,",
                        "ordinal":1,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65618,
                        "title":"可能性",
                        "label":"可能性",
                        "value":65625,
                        "key":"65625",
                        "children":[
                            {
                                "id":65626,
                                "name":"概率的认识",
                                "pathIds":"65618,65625,65626,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65625,
                                "title":"概率的认识",
                                "label":"概率的认识",
                                "value":65626,
                                "key":"65626"
                            },
                            {
                                "id":65627,
                                "name":"可能性的大小",
                                "pathIds":"65618,65625,65627,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65625,
                                "title":"可能性的大小",
                                "label":"可能性的大小",
                                "value":65627,
                                "key":"65627"
                            },
                            {
                                "id":65628,
                                "name":"游戏、比赛的规则公平性",
                                "pathIds":"65618,65625,65628,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65625,
                                "title":"游戏、比赛的规则公平性",
                                "label":"游戏、比赛的规则公平性",
                                "value":65628,
                                "key":"65628"
                            },
                            {
                                "id":65629,
                                "name":"生活中的概率",
                                "pathIds":"65618,65625,65629,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65625,
                                "title":"生活中的概率",
                                "label":"生活中的概率",
                                "value":65629,
                                "key":"65629"
                            }
                        ]
                    }
                ]
            },
            {
                "id":65630,
                "name":"探索规律",
                "pathIds":"65630,",
                "ordinal":3,
                "depth":1,
                "subjectId":2,
                "parent_id":0,
                "title":"探索规律",
                "label":"探索规律",
                "value":65630,
                "key":"65630",
                "children":[
                    {
                        "id":65631,
                        "name":"算术中的规律",
                        "pathIds":"65630,65631,",
                        "ordinal":0,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"算术中的规律",
                        "label":"算术中的规律",
                        "value":65631,
                        "key":"65631"
                    },
                    {
                        "id":65632,
                        "name":"数字排列的规律",
                        "pathIds":"65630,65632,",
                        "ordinal":1,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"数字排列的规律",
                        "label":"数字排列的规律",
                        "value":65632,
                        "key":"65632"
                    },
                    {
                        "id":65633,
                        "name":"式子的规律",
                        "pathIds":"65630,65633,",
                        "ordinal":2,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"式子的规律",
                        "label":"式子的规律",
                        "value":65633,
                        "key":"65633"
                    },
                    {
                        "id":65634,
                        "name":"图形的规律",
                        "pathIds":"65630,65634,",
                        "ordinal":3,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"图形的规律",
                        "label":"图形的规律",
                        "value":65634,
                        "key":"65634"
                    },
                    {
                        "id":65635,
                        "name":"数表中的规律",
                        "pathIds":"65630,65635,",
                        "ordinal":4,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"数表中的规律",
                        "label":"数表中的规律",
                        "value":65635,
                        "key":"65635"
                    },
                    {
                        "id":65636,
                        "name":"简单间隔、周期规律",
                        "pathIds":"65630,65636,",
                        "ordinal":5,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"简单间隔、周期规律",
                        "label":"简单间隔、周期规律",
                        "value":65636,
                        "key":"65636"
                    },
                    {
                        "id":65637,
                        "name":"简单覆盖规律",
                        "pathIds":"65630,65637,",
                        "ordinal":6,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65630,
                        "title":"简单覆盖规律",
                        "label":"简单覆盖规律",
                        "value":65637,
                        "key":"65637"
                    }
                ]
            },
            {
                "id":65638,
                "name":"数学竞赛",
                "pathIds":"65638,",
                "ordinal":4,
                "depth":1,
                "subjectId":2,
                "parent_id":0,
                "title":"数学竞赛",
                "label":"数学竞赛",
                "value":65638,
                "key":"65638",
                "children":[
                    {
                        "id":65639,
                        "name":"计算",
                        "pathIds":"65638,65639,",
                        "ordinal":0,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"计算",
                        "label":"计算",
                        "value":65639,
                        "key":"65639"
                    },
                    {
                        "id":65640,
                        "name":"数论",
                        "pathIds":"65638,65640,",
                        "ordinal":1,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"数论",
                        "label":"数论",
                        "value":65640,
                        "key":"65640",
                        "children":[
                            {
                                "id":65641,
                                "name":"质数与合数",
                                "pathIds":"65638,65640,65641,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65640,
                                "title":"质数与合数",
                                "label":"质数与合数",
                                "value":65641,
                                "key":"65641"
                            },
                            {
                                "id":65642,
                                "name":"公约数与公倍数",
                                "pathIds":"65638,65640,65642,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65640,
                                "title":"公约数与公倍数",
                                "label":"公约数与公倍数",
                                "value":65642,
                                "key":"65642"
                            },
                            {
                                "id":65643,
                                "name":"整除的性质",
                                "pathIds":"65638,65640,65643,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65640,
                                "title":"整除的性质",
                                "label":"整除的性质",
                                "value":65643,
                                "key":"65643"
                            },
                            {
                                "id":65644,
                                "name":"同余定理",
                                "pathIds":"65638,65640,65644,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65640,
                                "title":"同余定理",
                                "label":"同余定理",
                                "value":65644,
                                "key":"65644"
                            },
                            {
                                "id":65645,
                                "name":"方程相关",
                                "pathIds":"65638,65640,65645,",
                                "ordinal":4,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65640,
                                "title":"方程相关",
                                "label":"方程相关",
                                "value":65645,
                                "key":"65645"
                            }
                        ]
                    },
                    {
                        "id":65646,
                        "name":"计数",
                        "pathIds":"65638,65646,",
                        "ordinal":2,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"计数",
                        "label":"计数",
                        "value":65646,
                        "key":"65646",
                        "children":[
                            {
                                "id":65647,
                                "name":"加法原理",
                                "pathIds":"65638,65646,65647,",
                                "ordinal":0,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65646,
                                "title":"加法原理",
                                "label":"加法原理",
                                "value":65647,
                                "key":"65647"
                            },
                            {
                                "id":65648,
                                "name":"乘法原理",
                                "pathIds":"65638,65646,65648,",
                                "ordinal":1,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65646,
                                "title":"乘法原理",
                                "label":"乘法原理",
                                "value":65648,
                                "key":"65648"
                            },
                            {
                                "id":65649,
                                "name":"容斥原理",
                                "pathIds":"65638,65646,65649,",
                                "ordinal":2,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65646,
                                "title":"容斥原理",
                                "label":"容斥原理",
                                "value":65649,
                                "key":"65649"
                            },
                            {
                                "id":65650,
                                "name":"抽屉问题",
                                "pathIds":"65638,65646,65650,",
                                "ordinal":3,
                                "depth":3,
                                "subjectId":2,
                                "parent_id":65646,
                                "title":"抽屉问题",
                                "label":"抽屉问题",
                                "value":65650,
                                "key":"65650"
                            }
                        ]
                    },
                    {
                        "id":65651,
                        "name":"几何图形相关问题",
                        "pathIds":"65638,65651,",
                        "ordinal":3,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"几何图形相关问题",
                        "label":"几何图形相关问题",
                        "value":65651,
                        "key":"65651"
                    },
                    {
                        "id":65652,
                        "name":"竞赛应用题",
                        "pathIds":"65638,65652,",
                        "ordinal":4,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"竞赛应用题",
                        "label":"竞赛应用题",
                        "value":65652,
                        "key":"65652"
                    },
                    {
                        "id":65653,
                        "name":"数学趣题",
                        "pathIds":"65638,65653,",
                        "ordinal":5,
                        "depth":2,
                        "subjectId":2,
                        "parent_id":65638,
                        "title":"数学趣题",
                        "label":"数学趣题",
                        "value":65653,
                        "key":"65653"
                    }
                ]
            }
        ]
    }
];

const generateListKey = (data, parentKey) => {
    for (let i = 0; i < data.length; i++) {
        const node = data[i];
        node.key = parentKey + '-' + i;
        node.slots = { customRender: 'title'};
        if (node.children && node.children.length) {
            generateListKey(node.children, node.key);
        }
    }
}

generateListKey(orgTree, 0)

const  parseTreeToRow = (node, data = [], row = []) => {
    if (node.depth  &&  !columns[node.depth - 1]){
        columns.push({
            title: node.depth+'级知识点',
            dataIndex: 'value'+node.depth,
            align:'center',
            render: (text) => {
                let obj = {
                    children:'--',
                };
                if (text){
                    obj.children = text.name || ''
                    obj.props   =   {
                        rowSpan:text.rowspan
                    }
                }
                return obj;
            },
        })
    }

    if (!node.children) {
        data.push(row);
    } else {
        for (let i = 0; i < node.children.length; i++) {
            const child = node.children[i];
            const cell = { key:child.key, name: child.title || child.name || ''};
            /******************添加的代码******************/
                //深度克隆父亲，因为后代共用了该引用数据
                // console.log(JSON.parse(JSON.stringify(row)))
            const extendRow = [ ...JSON.parse(JSON.stringify(row)), cell];
            if (extendRow.length === 1) {    //第一列
                extendRow[0].rowspan = 1;
            } else if (extendRow.length > 1) {
                //将该行的最后一列的rowspan赋给上一列
                //再将自身置为1(避免最后一列无值)
                extendRow[extendRow.length - 2].rowspan = i === 0 ? computeLeafCount(node) : 0;
                extendRow[extendRow.length - 1].rowspan = 1;
            }
            /******************添加的代码******************/
            parseTreeToRow(child, data, extendRow);
        }
    }
    return data;
}

const computeLeafCount = (node) => {
    if(!node.children){
        node.rowspan = 1;
        return 1;
    } else {
        let leafCount = 0;
        for(let i = 0 ; i < node.children.length ; i++) {
            leafCount = leafCount + computeLeafCount(node.children[i]);
        }
        node.rowspan = leafCount;
        return leafCount;
    }
}


let table   =   []
orgTree.forEach(item=>{
    parseTreeToRow(item,table)
})

table.forEach((val,key)=>{
    let tableItem   =   {key:key}
    for (let index = 1;index <= columns.length;index ++){
        tableItem['value'+index] = ''
    }
    for (let index in val){
        tableItem['value'+(parseInt(index) + 1)] = val[index]
    }
    data.push(tableItem)
})

data.forEach((item,key)=>{
    let keys = Object.keys(item)
    if (data[key-1]){
        let prev = data[key-1]
        keys.forEach(k=>{
            if (k !== 'key' && prev[k] && item[k]){
                if (prev[k].name === item[k].name && prev[k].rowspan >=0 ){
                    data[key][k].rowspan = 0
                }
            }
        })
    }
})
function TreeData() {
    return (
        <>
            <Card>
                <Table
                    bordered={true}
                    columns={columns}
                    dataSource={data}
                    pagination={false}
                />
            </Card>
        </>
    );
}

export default TreeData


